package com.hospitalsystem.entity;

import java.text.SimpleDateFormat;
import java.util.Comparator;
import java.util.Date;

public class ArrangeComparator  implements Comparator<Arrange> {
    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @Override
    public int compare(Arrange a1,Arrange a2){
        Date date1 = a1.getArrangeTime();
        Date date2 = a2.getArrangeTime();
        return date1.compareTo(date2);
    }
}
